import request from '@/utils/request'

// 查询物料信息列表
export function listIteminfo(query) {
  return request({
    url: '/base/iteminfo/list',
    method: 'get',
    params: query
  })
}

// 查询物料信息详细
export function getIteminfo(id) {
  return request({
    url: '/base/iteminfo/' + id,
    method: 'get'
  })
}
// 查询物料信息详细
export function getIteminfoByIds(Ids) {
  return request({
    url: '/base/iteminfo/getIteminfoByIds/' + Ids,
    method: 'get'
  })
}
// 新增物料信息
export function addIteminfo(data) {
  return request({
    url: '/base/iteminfo',
    method: 'post',
    data: data
  })
}

// 修改物料信息
export function updateIteminfo(data) {
  return request({
    url: '/base/iteminfo',
    method: 'put',
    data: data
  })
}

// 删除物料信息
export function delIteminfo(id) {
  return request({
    url: '/base/iteminfo/' + id,
    method: 'delete'
  })
}
// 全部删除物料标准明细
export function delAllItemInfo() {
  return request({
    url: '/base/iteminfo/delAllItemInfo',
    method: 'delete'
  })
}
